package net.starwifi.duobao.repository;

import net.starwifi.duobao.entity.DBTimes;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;

/**
 * Created by Administrator on 2015/11/19.
 */
public interface DBTimesRepository extends Repository<DBTimes,Long> {

    DBTimes findByTimesNo(String timeNo);

    @Modifying
    @Query(value = "update net.starwifi.duobao.entity.DBTimes o set o.wantLotteryId=?2 where o.id=?1")
     void updateWantOrder(Long timesId,String orderId);


}
